function  [xn2,y,lista_x] = secante(f,xn0,xn1,e,lista_x,MAX_ITE)

    max_ite = 0;
    lista_x = [lista_x,xn0,xn1];    
	xn2 = xn1 - f(xn1)*((xn1- xn0)/ (f(xn1)-f(xn0))) ;
    while( abs(f(xn2)) > e && max_ite < MAX_ITE )
        xn0 = xn1;
		xn1 = xn2;
	    xn2 = xn1 - f(xn1)*((xn1 -xn0)/ (f(xn1)- f(xn0)));
		max_ite++;
        lista_x = [lista_x,xn2];
	endwhile
	y = f(xn2); 
endfunction 

